/*
	MAIN.CPP

	Contains WinMain, the main windows function

	Author: Kevin Hawkins
	Date: 3/19/2001
	Description:

*/


/* #include <windows.h> */

#include <iostream>
#include <SDL/SDL.h>
#include "oglwindow.h"		// the OpenGL window class
#include "vector.h"
#include "engine.h"			// the engine's main class
#include "simpengine.h"

using namespace std;

int main(int argc, char **argv)
{
	int loopRet;

/*	CoInitialize(NULL);

	if (!COGLWindow::RegisterWindow(hInst))
	{
		MessageBox(NULL, "Failed to register window class", "Error", MB_OK);
		return -1;
	}
*/

	CSimpEngine *engine = NULL;

	try
	{	
		engine = new CSimpEngine("OpenGL Game", true, 800, 600, 16);

		loopRet = engine->EnterMessageLoop();

		delete engine;

		return loopRet;
	}
	catch(char *sz)
	{	
/*		MessageBox(NULL, sz, 0, 0); */
		cerr << sz << endl;
		delete engine;
	}

	return -1;
}
